package edu.zli.redis.controller;

import edu.zli.redis.bean.User;
import edu.zli.redis.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author ZerlindaLi create at 2021/12/16 15:43
 * @version 1.0.0
 * @description RTpOptController
 * RedisTemplate操作示例
 */
@RestController
@RequestMapping("/api/rtp")
public class RTpOptController {
    @Autowired
    UserService userService;

    @RequestMapping("getUser")
    public User getUser(Long id) {
        return userService.getUser(id);
    }

    @RequestMapping("list")
    public List<User> listUser() {
        return userService.listUser();
    }
}
